package com.gk.carshopsys.dao;


import com.gk.carshopsys.pojo.Car;
import com.gk.carshopsys.pojo.Part;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;


@Repository
@Mapper
public interface PartDao {
    //批量新增库存
    public int addPartByList(List<Part> list);

    //查询配件
    public List<Part> findPart(@Param("part") Part part, @Param("low_price") Long low_price, @Param("hight_price") Long hight_price);

    //添加配件
    public int addPart(Part part);

    //更新配件
    public int updatePart(Part part);

    //删除配件
    public int delPart(List<Integer> part_list);

    //根据修改库存
    public int updateQuantityById(Part part);

    //根据id查询库存
    public Long findQuantityById(Long part);

    //查询配件
    public List<Part> findPartId(Long id);

}
